home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir42
/
bbdo43.zip
/
CUSTOM.PRG
< prev
next >
Wrap
Text File
|
1994-02-27
|
3KB
|
54 lines
*****************************************************************************
**-- Copyright 1993 B&B Systems *
**-- You can modify this file anyway you want *
**-- After making ANY changes here, this file needs to be compiled with *
**-- FoxPro, or started with FOXPRO to make an .FXP file. *
*****************************************************************************
**-- SAMPLE #1
**-- The line below will search for a data base file called
**-- Product.dbf, after entering <CTRL-F2>. If found it will be displayed
**-- on the screen.
ON KEY LABEL CTRL+F2 DO filelook WITH 'PRODUCT',.t.,.t.
**-- Sample #2
**-- Use this to move data with one keystroke while in the browse screen.
**-- the sample below will move data from a FIELD Called ACTIVITY1 (used
**-- to insert activity codes) to another field called ACTIVITY2, and
**-- move whatever information that was in ACTIVITY2 to ACTIVITY3.
**-- This assumes that your data base has threee fields called ACTIVITY1,
**-- ACTIVITY2, and ACTIVITY3.
**-- Note: if you insert the key word ALL after REPLACE, all records
**-- in the data file would be changed.
**-- ON KEY LABEL CTRL+F3 REPLACE ACTIVITY3 WITH ACTIVITY2, ACTIVITY2 WITH ACTIVITY1
**-- Sample #3
**-- Take the asterisk off the line below if you have a 1) REP (Sales
**-- Representative) file, 2) a field called REP for a sales rep code
**-- in your main data file, and 3) you want to access the proper REP Name/
**-- Phone number, etc. in Reports, Labels, Letters with this
**-- variable name:<<REP->repname>>, <<REP->repphone>>
IF file00='SAMPLE' &&name of your master file - You only want to call this when your using a file containing REP
IF FILE('REP.DBF')
=g_opnfl('REP','REP',.f.,.f.) &&This line opens a file .f.=don't open exclusively, .f.=don't open again (if already open)
SET ORDER TO TAG rep
SELECT &file00
SET RELATION TO rep INTO REP
ENDIF
ENDIF
**-- Sample #4 (Same as #3, but uses state.dbf file)
**-- Allows use of Illinois instead of IL, or Wisconsin instead of WI <<STATE->desc>>.
**-- or access to county names with <<STATE->county>>
*IF file00='SAMPLE' &&name of your master file - You only want to call this when your using a file containing STATE
*IF FILE('STATE.DBF')
*=g_opnfl('STATE','STATE',.f.,.f.)
*SET ORDER TO TAG state
*SELECT &file00
*SET RELATION TO state INTO STATE
*ENDIF
*ENDIF